/*
package com.simtop;


public class Test4 {
    public static void main(String[] args) throws Exception {


        @RequestMapping("/close")
        //通过cmd命令，关闭程序
        public String close(){
            closeHistoryProgram("Code.exe");
            return "hello yqy";
        }

        public void closeHistoryProgram(String processName){
            String cmd = "taskkill /f /t /im "+processName;
            try
            {
                //exec执行cmd命令
                Process process = Runtime.getRuntime().exec(cmd);
                //获取CMD命令结果的输出流
                InputStream fis=process.getInputStream();
                InputStreamReader isr=new InputStreamReader(fis,"GBK");
                //使用缓冲器读取
                BufferedReader br=new BufferedReader(isr);
                String line=null;
                //全部读取完成为止，一行一行读取
                while((line=br.readLine())!=null)
                {
                    //输出读取的内容
                    System.out.println( line );
                }
            }catch (IOException e)
            {
                e.printStackTrace();
            }
        }



    }
*/




